{% extends 'homepage.html' %}

{% block content %}

<script type="text/javascript" src="{{ url_for('static', filename='classical_modular_form_util-functions.js') }}"></script>
<script type="text/javascript" src="{{ url_for('static', filename='classical_modular_form_scripts.js') }}"></script>
<script>
$(document).ready( function() {
$("#wait").text("Plot of fundamental domain is loading!");
$("#plot").load(function() {
         $("#wait").text("");
    });
}
);
</script>
{% if info.error is defined %}

<h1>There was an error in meeting your previous request. Please change parameters.</h1>

<div> 
<h2> Error message: </h2>
{{ info.error | safe }}
</div>
{% endif %}

<table>
  <tr>
    <td>
      <h3>Browse spaces of new cusp forms {{info.browse_type | safe}}</h3>
      
      {{info.list_spaces| safe }}
    </td>
  </tr>
</table>
<br>
<table>
  <tr>
    {% if info.geometric is defined %}
    <td valign="top">
      {% if info.level > 1 %}
      <h3>Geometric information for \(\Gamma_{0}({{ info.level}})\)</h3>
      {% else %}
      <h3>Geometric information for \(PSL_{2}(\mathbb{Z}) \)</h3>
      {% endif %}
      {{ info.geometric | safe }}
    </td>
    {% endif %}
    {% if info.fd_plot is defined %}
    <td>
      <div>
      <span id="wait">      </span>
      <img id="plot" src="{{ info.fd_plot | safe }} " width="" height=""/>
      </div>
    </td>
      {% endif %}

  </tr>
</table>
{% endblock content %}
